using System.Collections.Generic;
using System.Collections.ObjectModel;
using Matrix.Notification.Notifications.Dto;

namespace Matrix.Notification.Notifications.Cache
{
    /// <summary>
    /// 通知缓存项
    /// </summary>
    public class NotificationCacheItem
    {
        /// <summary>
        /// 总数量
        /// </summary>
        public int TotalCount { get; set; }

        /// <summary>
        /// 通知列表
        /// </summary>
        public ReadOnlyCollection<NotificationDto> Notifications { get; private set; } = new ReadOnlyCollection<NotificationDto>(new List<NotificationDto>());

        /// <summary>
        /// 缓存时间
        /// </summary>
        public System.DateTime CacheTime { get; set; }

        /// <summary>
        /// 过期时间
        /// </summary>
        public System.DateTime? ExpirationTime { get; set; }

        /// <summary>
        /// 用户ID
        /// </summary>
        public string? UserId { get; set; }

        /// <summary>
        /// 缓存键
        /// </summary>
        public string? CacheKey { get; set; }
    }
}